package com.newlink.building.secret.mvp.model

import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.*
import com.newlink.building.secret.mvp.contract.Module_Secret_SecretKeyContract
import io.reactivex.Observable

/**
 * Created by xiaodong on 2022/10/2.
 */
class Module_Secret_SecretKeyModel : BaseModel(), Module_Secret_SecretKeyContract.Model {

    override fun getSecretKeyInfo(requestBean: SecretKeyInfoRequest): Observable<HttpResult<SecretKeyData>> {
        return Base_RetrofitHelper.service.getSecretKeyInfo(requestBean.accessToken, requestBean.keyId)
    }

    override fun deleteSecretKey(requestBean: SecretKeyDeleteRequest): Observable<HttpResult<StatusData>> {
        return return Base_RetrofitHelper.service.deleteSecretKey(
            requestBean.accessToken,
            requestBean.keyIds
        )
    }

}